package com.mycat.redis.pool;

import redis.clients.jedis.Jedis;

/**
 * Redis 连接
 *
 * @author roger.
 * @email 190642964@qq.com
 * @create 2016-12-20
 */
public abstract class JedisConnection {

    /**
     * 获取Redis连接
     * @return Jedis
     */
    public abstract Jedis getResource();

    /**
     * 关闭Redis连接
     */
    public abstract void closeResource(Jedis jedis);

    /**
     * 初始化连接池
     */
    protected abstract void initPool();
}
